#!/bin/bash

getopt -Qn 'Error' h

export CLASSPATH=/usr/websm/codebase/pluginjars/hmcdebug.jar:/opt/hsc:/usr/websm/codebase/pluginjars/sniacimom.jar:/usr/websm/codebase/pluginjars/xerces.jar:/usr/websm/codebase/pluginjars/HwmcaCommon.jar:/usr/websm/codebase/pluginjars/auifw.jar:$CLASSPATH
export PATH=/opt/IBMJava2-13/jre/bin:$PATH
if [ $# -eq 0 ];
then java -Djavax.net.ssl.keyStore=/usr/websm/codebase/SM.pubkr -Djavax.net.ssl.keyStorePassword=defp -DcimomConfigFile=/opt/hsc/data/cimomcfg.properties com.ibm.hsc.common.util.QueryCecs
exit 0
fi

if [ $1 = '-h' ];
then echo
echo usage: query_cecs '     ' lists the systems being managed by the HMC
echo
echo Options:
echo '   ' -h brings up this help screen
echo
exit 0
fi

if [ $# -gt 1 ];
then echo usage: query_cecs
exit 1
fi
